<template>
  <div class="basic-code">
    <pre v-html="data" v-if="data"></pre>
    <pre><slot></slot></pre>
  </div>
</template>

<script>
export default {
  name: "BasicCode",
  props: {
    data: {
      type: String,
      default: "",
    },
  },
};
</script>

<style scoped lang="scss">
.basic-code {
  color: #333;
  word-break: break-all;
  word-wrap: break-word;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  margin: 10px 25px;
  padding: 0 10px;
}
</style>
